package br.com.colegio.dao;

import java.util.Collection;

import br.com.colegio.dao.storage.Storage;
import br.com.colegio.vo.LancamentoParcela;

public class LancamentoParcelaDAO
{
	public static Collection<Object> list()
	{
		try
		{
			return Storage.select(LancamentoParcela.class.getName(), null);
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}

		return null;
	}

	public static LancamentoParcela get(Long cod)
	{
		try
		{
			Object res = Storage.get(LancamentoParcela.class.getName(), cod);

			if (res != null)
				return (LancamentoParcela)res;
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}

		return null;
	}

	public static LancamentoParcela save(LancamentoParcela reg) throws Exception
	{
		return (LancamentoParcela)Storage.save(reg);
	}

	public static void delete(Long reg) throws Exception
	{
		Storage.delete(LancamentoParcela.class.getName(), reg);
	}
}
